//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Collections.Generic;
using System.Text;
using OpenLS.Core.Serialization;
using OpenLS.Vml.Serialization;

namespace OpenLS.Vml.Drawing
{
    class Ink : ShapeElement
    {
        private string _i;
        private bool? _annotation;

        private void readXml(ReadContext context)
        {
            using (var c = context.Read(VmlConstants.OfficeNamespace +  "ink"))
            {
                _i = c.GetString("i");
                _annotation = c.GetOptionalBoolean("annotation");
            }

        }

        internal override void ReadXmlCore(ReadContext context)
        {
            readXml(context);
        }

        private void writeXml(WriteContext context)
        {
            using (var c = context.Write(VmlConstants.OfficeNamespace + "ink"))
            {
                c.SetString("i", _i);
                c.SetOptionalBoolean("annotation", _annotation);
            }

        }

        internal override void WriteXmlCore(WriteContext context)
        {
            writeXml(context);
        }
    }
}
